package org.lsi.pl2.parser;

import antlr.CommonAST;
import antlr.Token;
import antlr.collections.AST;

public class ReferenciaAST extends CommonAST {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int linea;
	private int columna;
	
	public ReferenciaAST() {}
	public ReferenciaAST(Token t) {
		initialize(t);
	}
	public ReferenciaAST(AST a) {
		initialize(a);
	}
	@Override
	public void initialize(Token t) {
		super.initialize(t);
		setLinea(t.getLine());
		setColumna(t.getColumn());
	}
	@Override
	public void initialize(AST a) {
		super.initialize(a);
		if (a instanceof ReferenciaAST) {
			ReferenciaAST ra = (ReferenciaAST)a;
			setLinea(ra.getLinea());
			setColumna(ra.getColumna());
		}
	}
	public int getColumna() {
		return columna;
	}
	public void setColumna(int columna) {
		this.columna = columna;
	}
	public int getLinea() {
		return linea;
	}
	public void setLinea(int linea) {
		this.linea = linea;
	}
}